<table class="table table-condensed table-hover">
<tbody>
</tbody>
<tr>
    <th colspan="2">
        {{ _("Phone Number") }}: {{ object.number }}
    </th>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("Dialplan") }}
    </th>
    <td>
        <a href="/api/card/view/dialplan/{{ object.dialplan.id }}/">{{ object.dialplan.name }}</a>
        {% for p in path %}
            /
            <a href="/api/card/view/phonerange/{{ p.id }}/">{{ p.name }} ({{ p.from_number }} - {{ p.to_number }})</a>
        {% endfor %}
    </td>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("Category") }}
    </th>
    <td>
        {% if object.category %}{{ object.category.name }}{% endif %}
    </td>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("State") }}
    </th>
    <td>
        {{ object.state.name }}
    </td>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("Protocol") }}
    </th>
    <td>
        {{ object.protocol }}
    </td>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("Profile") }}
    </th>
    <td>
        {% if object.profile %}{{ object.profile.name }}{% endif %}
    </td>
</tr>
<tr>
    <th scope="row" class="col-md-2">
        {{ _("Project") }}
    </th>
    <td>
        {% if object.project %}{{ object.project.name }}{% endif %}
    </td>
</tr>

<tr>
    <th scope="row">
        {{ _("Description") }}
    </th>
    <td>
        {% if object.description %} {{ object.description }} {% endif %}
    </td>
</tr>

<tr>
    <th scope="row">
        {{ _("ENUM") }}
    </th>
    <td>
        {{ object.enum }}
    </td>
</tr>

{% if service_groups %}
    <tr>
        <th scope="row">{{ _("Provides Resources") }}</th>
        <td>
            <table class="table table-condensed table-hover">
                <thead>
                    <th>{{ _("Group") }}</th>
                    <th>{{ _("Technology") }}</th>
                    <th>{{ _("Type") }}</th>
                </thead>
                <tbody>
                {% for g in service_groups %}
                    <tr>
                        <td><a href="/api/card/view/resourcegroup/{{ g["id"] }}/">{{ g["name"] }}</a></td>
                        <td><a href="/api/card/view/technology/{{ g["technology"]["id"] }}/">{{ g["technology"]["name"] }}</a></td>
                        <td>{% if g["is_static"] %}{{ _("Static") }}{% else %}{{ _("Dynamic") }}{% endif %}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </td>
    </tr>
{% endif %}
{% if client_groups %}
    <tr>
        <th scope="row">{{ _("Consumes Resources") }}</th>
        <td>
            <table class="table table-condensed table-hover">
                <thead>
                    <th>{{ _("Group") }}</th>
                    <th>{{ _("Technology") }}</th>
                    <th>{{ _("Type") }}</th>
                </thead>
                <tbody>
                {% for g in client_groups %}
                    <tr>
                        <td><a href="/api/card/view/resourcegroup/{{ g["id"] }}/">{{ g["name"] }}</a></td>
                        <td><a href="/api/card/view/technology/{{ g["technology"]["id"] }}/">{{ g["technology"]["name"] }}</a></td>
                        <td>{% if g["is_static"] %}{{ _("Static") }}{% else %}{{ _("Dynamic") }}{% endif %}</td>
                    </tr>
                {% endfor %}
                </tbody>
            </table>
        </td>
    </tr>
{% endif %}
